<!DOCTYPE html>
<html lang="zh">

<head>
	<meta charset="UTF-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=no">
	<title>LoyDgIk</title>
	<style>
.search-from{
	overflow: visible;
}
.input-bg{
	line-height: 50px;
    height: 50px;
	display: flex;
	overflow: visible;
	font-size:14px;
	margin: 14px 18px;
	border-radius: 14px;
	opacity: 0;
	transition: opacity .3s;
	will-change: opacity;
	border: 2px solid transparent;
	opacity: 1;
}

.search-input{
    outline:none;
    font-size: 17px;
	flex: 1;
	border:0;
	padding-left: 20px;
	background-color: transparent;
	caret-color: #2196F3;
	color: var(--dark);
	width: 0;
	line-height: 1;
}


.search-btn{
    -webkit-user-select: none; 
	margin-right: 20px;
	color: var(--dark);
	font-size: 16px;
    line-height: 49px;
    padding-left: 15px;
	font-weight: bold;
    border-left:2px solid black;
}

    </style>
<body style="overflow:hidden;">
<div class="search-from"> 
      <div class="input-bg animation" style="border-color: var(--dark);"> 
       <input type="text" class="search-input" id="search-input"placeholder="搜索内容 . . ."> 
       <div class="search-btn"id="search-ok">
        搜索
       </div> 
      </div> 
     </div>
     <script>
      document.getElementById("search-ok").onclick=function(){
         var k=document.getElementById("search-input").value

         var work=fy_bridge_app.fetch("hiker://files/searchwork.json");
         if(work==""){
             work=[];
         }else{
             work=JSON.parse(work);
         }
         if(work.length<11&&k){
             work.unshift(k);
             work=Array.from(new Set(work))
             //alert(work)
             fy_bridge_app.writeFile("hiker://files/searchwork.json",JSON.stringify(work));
         }
         fy_bridge_app.putVar("searchKeyword",k);
         fy_bridge_app.refreshPage(true);
         //fy_bridge_app.putVar("searchKeyword",k);
     }
     if(fy_bridge_app.getVar("searchKeyword")!=""){
         document.getElementById("search-input").value=fy_bridge_app.getVar("searchKeyword");
     }
     </script>
</body>

</html>